package com.yuan.statemachine.business;

/**
 * @author wjwei
 */

public enum BusinessStateCode {

    /** 状态机操作状态码*/
    SUCCESS(200, "执行成功"),
    ERROR(500, "系统错误"),
    NO_EVENT(401, "没有此事件"),
    BUSINESS_ERROR(6000,"业务异常"),
    CREATED_ERROR(6001,"当前状态，不能下单"),
    PAY_ERROR(6002,"当前状态，不能支付"),
    INTERCEPT_ERROR(6003,"当前状态，不能拦截"),
    COLLECT_ERROR(6004,"当前状态，不能揽收"),
    DELIVER_ERROR(6005,"当前状态，不能发货"),
    INVALID_ERROR(6006,"当前状态，不能作废")
    ;

    private final int code;
    private final String message;

    BusinessStateCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
